package com.storm.common.exception

interface IStatusInfo {
    fun status(): Int
    fun message(): String
}


enum class StatusInfo(private val status: Int, private val message: String):IStatusInfo  {
    OK(200,"执行成功！"),
    INTERNAL_SERVER_ERROR(500, "内部错误"),
    BUSINESS_ERROR(10000, "业务异常提示"),
    BAD_REQUEST(400, "错误的请求"),
    NON_EXISTENT(10001,"结果不存在"),
    ;
    var data: Any? = null

    override fun status(): Int {
        return this.status
    }

    override fun message(): String {
       return this.message
    }
}